<?php namespace web\admin\controller;

/**
* 后台入口控制器
*/
class Entry
{
	public function __construct()
	{
		Middleware::set('bootstrap');
		Middleware::run();
	}

	public function index()
	{
		User::isLogin();
		View::make();
	}


	//后台登陆
	public function login()
	{
		if (IS_POST) {
			if (User::login()) {
				message('登录成功','index','success');
			}
		}
		View::make();
	}

	public function quit()
	{
		if (User::quit()) {
			message('退出成功','login','success');
		}
	}
}